package homework.api.day08._cp;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemo {
    public static void main(String[] args) {

        try(
            FileOutputStream fos = new FileOutputStream("pwNote.txt");
            BufferedOutputStream bos = new BufferedOutputStream(fos);
        ){
            bos.write(97);
            bos.write(98);
            bos.write(99);
        }catch (IOException e){
            System.out.println("出现IO异常");
        }
    }
}
